Skip to main content

Get Workbook Sheet

AutomatR.Excel.Activities.GetWorkbookSheet

The "Get Workbook Sheet" activity in AutomatR is part of the Excel activities package, designed to look for a sheet based on its index and return its name as a string variable. This activity enhances automation workflows by providing the flexibility to dynamically identify and work with specific sheets within an Excel workbook.

Properties

NameDescription
Input
IndexSpecifies the index of the sheet to retrieve. Integer variables containing the sheet index (1-based index).
Misc
Display NameThe display name of the activity. A display name is automatically generated when you indicate a target.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get Workbook Sheet" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
SheetOutputs the name of the sheet based on the provided index. String variables containing the sheet name.

How to use:

  1. Drag and drop the "Get Workbook Sheet" activity onto the workflow.
  2. Configure the properties by specifying the sheet index.
  3. Optionally, configure the delay.
  4. Execute the workflow to retrieve the name of the specified sheet.

Example: Consider an example where the "Get Workbook Sheet" activity is used to retrieve the name of the sheet at index 2:

Get Workbook Sheet:
Delay: 2
Index: 2
Sheet: sheetName

In this example, the activity retrieves the name of the sheet at index 2, and the sheet name is stored in the string variable "sheetName" for further processing in the workflow.

Note: Ensure that the "Get Workbook Sheet" activity is placed within an "Excel Root" activity to establish the Excel context for execution.